package com.jwork.progress.controllers;

import com.jwork.progress.params.CommonResponse;
import com.jwork.progress.pojo.dto.admin.GetAminListDTO;
import com.jwork.progress.pojo.vo.repoadmin.RepoAdminVO;
import com.jwork.progress.service.RepoAminService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "用户信息")
@RestController
@RequestMapping("/admin")
@RequiredArgsConstructor
public class RepoAdminController {
    private final RepoAminService repoAminService;

    @ApiOperation(value = "列表")
    @PostMapping("/getList")
    @ApiResponses({@ApiResponse(code = 200, message = "成功", response = RepoAdminVO.class)})
    public CommonResponse getAminList(@RequestBody @Validated GetAminListDTO dto) {
        return repoAminService.getAdminList(dto);
    }
}
